cmake_minimum_required(VERSION 3.12)
project(demo1)

 #设置C/C++源文件
set(CPP_SOURCE_FILES
    main.cpp
)


# 设置CUDA源文件
set(CUDA_SOURCE_FILES
      cudaService/cudaService.cu
)

find_package(CUDA REQUIRED)
message(STATUS "CUDA_DIR = ${CUDA_DIR}")
message(STATUS "CUDA_INCLUDE_DIRS = ${CUDA_INCLUDE_DIRS}")
message(STATUS "CUDA_LIBRARIES = ${CUDA_LIBRARIES}")

include_directories(${CUDA_INCLUDE_DIRS})

cuda_add_executable(prog ${CUDA_SOURCE_FILES} ${CPP_SOURCE_FILES})

target_link_libraries(prog -lX11)